package com.example.administrator.teainfo.fragment;


import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.example.administrator.teainfo.R;


/**
 * A simple {@link Fragment} subclass.
 */
public class FirstRunFragment extends Fragment {


    public FirstRunFragment() {
        // Required empty public constructor
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        View  view = inflater.inflate(R.layout.fragment_first_run,container,false);
        ImageView iv = (ImageView) view.findViewById(R.id.fragment_first_run_iv);
        int type = getArguments().getInt("type",0);
        switch (type){
            case 0:
                iv.setBackgroundResource(R.drawable.slide1);
                break;
            case 1:
                iv.setBackgroundResource(R.drawable.slide2);
                break;
            case 2:
                iv.setBackgroundResource(R.drawable.slide3);
                break;
        }
        return view;
    }

}
